<div class="main-wrap">
  <section id="individual-post">
    <?php
    $permalink = permalink(array('text' => $detail->post_title, 'id' => $detail->id));
    $shareLink = urlencode($permalink);
    ?>
    <article 
						data-entry-thumbnail-url="<?php echo getThumbnail('400x', $detail->post_image) ?>"
						id="jsid-entry-entity-aD0zD6d"
						class="badge-entry-container badge-entry-entity post-page">
      <header>
        <h2 class="badge-item-title"><?php echo strip_tags($detail->post_title); ?></h2>
      </header>
      <div class="badge-entry-content post-container"> <a href="javascript: void(0);">
        <?php if(in_array($detail->item_type, array('photo', 'gif'))): ?>
        <img class="badge-item-img" src="<?php echo getImage($detail->post_image) ?>" />
        <?php elseif($detail->video_code != ''): ?>
        <script type="text/javascript" src="<?php echo STATIC_URL ?>/jwplayer/jwplayer.js"></script>
        <script type="text/javascript">jwplayer.key="xg7iFCWixrDgR/+3QbcunkhSm4KGcNXVD5xrEzQyerSO5tqPDkQACfWlCIQ=";</script>
        <div id="videoPlayer"></div>
        <script>
			                jwplayer("videoPlayer").setup({
			                    file: "http://www.youtube.com/watch?v=<?php echo youtubeVideoExtractor($detail->video_code) ?>",
			                    image: "<?php echo getImage($detail->post_image); ?>",
			                    height: 320,
			                    width: 600
			                });
			            </script>
        <?php endif; ?>
        </a> </div>
      <!-- Top like comment -->
      <div id="top_comment"><p class="box_title">Hot comment</p>
        <p class="comment_text" id="cmt-text"></p>
        <p class="comment_author" id="cmt-author"></p>
      </div>
          <script type="text/javascript">
          $(document).ready(function(){
            $.ajax({
              url: "<?php echo BASE_URL.'/ajax/topfbcmt' ?>",
              type: 'POST',
              dataType: 'json',
              data: {'url':'<?php echo $permalink; ?>'},
              }).done(function(data){
                  if(data.top.message != '' && data.top.message !== undefined){
                      $('#cmt-text').html(data.top.message);
                      $('#cmt-author').html('<a href="http://www.facebook.com/'+data.top.from.id+'" target="_blank">'+data.top.from.name+'</a>');
                      $('#top_comment').show();
                  }
            });
          });
          </script>
      <!--/ Top like comment -->

      <div class="adblock ad-bottom-detail">
        <?php include(__DIR__ . '/block/GA_468x60.php') ?>
      </div>

      <div id="comment" class="post-afterbar">
        <div class="share">
          <div class="share-count">
            <p>TOP<br />TATTOOS</p>
          </div>
          <ul>
            <li><a href="https://www.facebook.com/sharer/sharer.php?u=<?php echo $shareLink; ?>" title="Chia sẻ lên facebook" target="_blank" class="badge-facebook-share badge-evt badge-track facebook"><span>Share on Facebook</span></a></li>
            <li><a title="Đăng lên Google+" target="_blank" href="https://plus.google.com/share?url=<?php echo $shareLink; ?>" class="badge-gplus-share badge-evt badge-track google-plus">Share on Google+</a> </li>
            <li><a title="Gửi lên Twitter" href="https://twitter.com/share?url=<?php echo $shareLink; ?>" target="_blank" class="badge-twitter-share badge-evt badge-track twitter">Tweet this</a> </li>
            <li><a title="Pin lên Pinterest" target="_blank" href="//www.pinterest.com/pin/create/button/?url=<?php echo $shareLink; ?>&media=<?php echo urlencode(getThumbnail('400x', $detail->post_image)); ?>" class="badge-pinterest-share badge-evt badge-track pinterest">Pin it</a> </li>
          </ul>
        </div>
        <div class="vote">
          <ul class="badge-item-vote-container ">
            <!-- <li>
              <h3 id="love-count-<?php echo $detail->id; ?>" class="badge-item-love-count count" title="<?php echo number_format($detail->like_count) ?> người đã thích"><?php echo number_format($detail->like_count) ?></h3>
            </li> -->
            <li class="facebook-like">
              <div class="fb-like" data-href="<?php echo $permalink ?>" data-width="150" data-layout="button_count" data-show-faces="false" data-send="false"></div>
            </li>
            <li class="like34">
              <!-- Place this tag where you want the +1 button to render. -->
              <div class="g-plusone" data-size="medium" data-callback="CGT.googlePlusCallBack"></div>

              <!-- Place this tag after the last +1 button tag. -->
              <script type="text/javascript">
                window.___gcfg = {lang: 'vi'};

                (function() {
                  var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
                  po.src = 'https://apis.google.com/js/plusone.js';
                  var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
                })();
              </script>
            </li>
          </ul>
        </div>
      </div>

    </article>
  </section>
  <section class="post-comment">
    <h3>Leave a comment</h3>
    <div class="fb-comments" data-href="<?php echo $permalink ?>" data-width="600" data-num-posts="20"></div>
  </section>
  </section>
  <div class="adblock ad-bottom-detail">
    <?php include(__DIR__ . '/block/GA_468x15_link.php') ?>
  </div>
  <!--end .banner-block-->

</div>
